import { Button ,Form,Input,} from 'antd-mobile'
import {
   
   
    Dialog,
    TextArea,
    DatePicker,
    Selector,
    Slider,
    Stepper,
    Switch,
  } from 'antd-mobile'
import React from 'react'
import { useNavigate } from 'react-router-dom'

function Index() {
    const onFinish = (values) => {
       navigate('/chat')
      }
    const navigate=useNavigate()
  
  return (
    <div>
        <div style={{display:'flex' ,justifyContent:'space-around'}}>
        <Button>扫描证件添加</Button>
        <Button>邀请好友填写</Button>
        
        </div>
        <Form
        layout='horizontal'
        onFinish={onFinish}
        footer={
          <Button block type='submit' color='primary' size='large' >
            确定
          </Button>
        }
      >
       
        <Form.Item
          name='name'
          label='姓名'
          rules={[{ required: true, message: '姓名不能为空' }]}
        >
          <Input onChange={console.log} placeholder='请输入姓名' />
        </Form.Item>
        <Form.Item
          name='id'
          label='证件号码'
          rules={[{ required: true, message: '证件号码不能为空' }]}
        >
          <Input onChange={console.log} placeholder='请输入证件号码' />
        </Form.Item>
        <Form.Item
          name='phone'
          label='手机号码'
          rules={[{ required: true, message: '手机号码不能为空' }]}
        >
          <Input onChange={console.log} placeholder='请输入手机号码' />
        </Form.Item>
        
       
      </Form>
    <Button onClick={()=>toChat}>客服聊天</Button>
    </div>
    
  )
}

export default Index